package com.lzx.reader;

import java.io.*;
import java.util.ArrayList;
import java.util.List;

/**
 * @author: 如寄
 * @version: v1.0
 * @description: com.lzx.test
 * @date:2021/4/18
 */
public class ReadFile {
    //    读取训练好的模型数据
    public static List<String> read(File model) throws IOException {
        String str = null;
        List<String> list = new ArrayList<>();
        InputStreamReader isr = new InputStreamReader(new FileInputStream(model), "UTF-8");
        BufferedReader bufferedReader = new BufferedReader(isr);
        while ((str = bufferedReader.readLine()) != null) {
            list.add(str);
        }
        bufferedReader.close();
        return list;
    }
}
